<?php

use yii\helpers\Html;
use yii\grid\GridView;
  use yii\helpers\Url;
  use yii\widgets\Pjax;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel backend\modules\rbac\models\searchs\Menu */

$this->title = '菜单列表';

?>
<div class="ibox float-e-margins" id="bx_search_form">
    <div class="ibox-title">
      <?= Html::a('添加', '#', ['class' => 'btn btn-primary BX_action_null','data-href'=>Url::to(['create'])]) ?>
      <?= Html::a('编辑', '#', ['class' => 'btn btn-warning  BX_action_id','data-href'=>Url::to(['update'])]) ?>
      <?= Html::a('查看', '#', ['class' => 'btn btn-success  BX_action_id','data-href'=>Url::to(['view'])]) ?>
      <?= Html::a('删除', '#', ['class' => 'btn btn-danger  BX_action_id_jump','data-href'=>Url::to(['delete'])]) ?>
    </div>
</div>


<div class="ibox-content">
  <div class="menu-index">

    <?php //Pjax::begin(); ?>
    <?=
    GridView::widget([
        'options' => ['class' => 'grid-view','id' => 'grid'],
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            //['class' => 'yii\grid\SerialColumn'],
          [
            'class' => 'yii\grid\CheckboxColumn',
            'multiple'=> true,
            //'cssClass'=>'t',
            'name' => 'grid',
            'checkboxOptions'=>['class'=>'grid']
          ],
            'name',
            [
                'attribute' => 'menuParent.name',
                'filter' => Html::activeTextInput($searchModel, 'parent_name', [
                    'class' => 'form-control', 'id' => null
                ]),
                'label' => '父级',
            ],
            'route',
            'order',
            //['class' => 'yii\grid\ActionColumn'],
        ],
    ]);
    ?>
  <?php //Pjax::end(); ?>

  </div>
</div>
